package com.sunyur.tailor.channel.service.outer.keep.service;

import com.alibaba.fastjson.JSONObject;
import com.sunyur.tailor.channel.common.inner.base.MsgResultCode;
import com.sunyur.tailor.channel.common.middle.base.ChannelResult;
import com.sunyur.tailor.channel.service.outer.keep.param.SRMPurchaseFeishuForApprovalParam;

/**
 *  Keep 对接飞书 提交操作 Service
 */
public interface KeepToFeishuService {

    /**
     * 提交飞书审批实例  （SRM采购申请发至飞书进行审批）
     * @param srmPurchaseFeishuForApprovalParam
     * @return
     */
    ChannelResult<Boolean> sRMPurchaseFeishuForApproval(MsgResultCode msgResultCode,SRMPurchaseFeishuForApprovalParam srmPurchaseFeishuForApprovalParam);

    /**
     * 获取token
     */
    String getAuthorization();

    /**
     * 发送带Token Post请求
     * @param t
     * @param url
     * @param authorization
     * @return
     */
    JSONObject exchangeJsonPost(Object t, String url, String authorization);
}
